#ifndef ENEMY_HH
#define ENEMY_HH

#include "ICharacter.hh"
#include <string>
#include <vector>

// Represents a hostile enemy in the game. Inherits from the ICharacter interface. 

class Enemy : public ICharacter {
    private:
        std::string name;
        unsigned health;
        unsigned attackPower;
        unsigned defensePower;

    public:
        Enemy(const std::string& name, unsigned health,unsigned defense, unsigned attack);
        Enemy()=default;
        Enemy(const Enemy& other)=default;
        virtual ~Enemy() = default;

        // 基本属性
        std::string getName() const override;
        unsigned getHealth() const override;
        unsigned getAttack() const override;
        unsigned getDefense() const override;
        std::string toString() const override;

        // 状态与行为
        virtual bool isAlive() const override;
        virtual void attack(ICharacter& target) override;

        // 运算符重载
        virtual ICharacter& operator-=(unsigned damage) override;
        ICharacter& operator*(ICharacter& target) override;
        Enemy& operator=(const Enemy& other)=default;
};

#endif